package com.cheng.io.decorator;

/**
 * 抽象装饰者，所有装饰者的父类
 */
public abstract class CloseableDecorator implements Closeable{
    private final Closeable closeable;

    protected CloseableDecorator(Closeable closeable) {
        this.closeable = closeable;
    }

    @Override
    public void close() {
        closeable.close();
    }
}
